/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ipfms.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author fikri
 */
@Entity
@Table(name = "code_user_role")
@NamedQueries({
    @NamedQuery(name = "KodPenggunaPeranan.findAll", query = "SELECT c FROM KodPenggunaPeranan c")})
public class KodPenggunaPeranan implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "code")
    private String code;
    @Basic(optional = false)
    @Column(name = "desc")
    private String desc;

    public KodPenggunaPeranan() {
    }

    public KodPenggunaPeranan(String code) {
        this.code = code;
    }

    public KodPenggunaPeranan(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (code != null ? code.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof KodPenggunaPeranan)) {
            return false;
        }
        KodPenggunaPeranan other = (KodPenggunaPeranan) object;
        if ((this.code == null && other.code != null) || (this.code != null && !this.code.equals(other.code))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ipfms.model.CodeUserRole[ code=" + code + " ]";
    }
    
}
